package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2023-03-01
 * Time: 18:40
 */
@Controller
public class TestController {


    //请求从定向
    @RequestMapping("/index")
    public String index() {
        return "redirect:/reg.html";
    }

    //请求转发
    @RequestMapping("/index2")
    public String index2() {
        return "forward:/login.html";
    }

}
